package edu.tec.mty.test.gui.canvas;

public class CanvasUtil {

	private static double factor = 5.0;
	
	public static int convertXPositionToCoord(double x) {
		return (int)(factor*x + 297);
	}
	
	public static int convertYPositionToCoord(double y) {
		return (int)(factor*y + 205);
	}
	
	public static int convertLength(double lenght) {
		return (int)(factor*lenght);
	}
	
	public static int getDeltaX(double direction, double length) {
		return (int)(factor*length*Math.cos(Math.toRadians(direction)));
	}
	
	public static int getDeltaY(double direction, double length) {
		return (int)(factor*length*Math.sin(Math.toRadians(direction)));
	}
	
	/*public static void main(String[] args) {
		System.out.println(CanvasUtil.convertXPositionToCoord(0.0));
		System.out.println(CanvasUtil.convertYPositionToCoord(0.0));
	}*/
	
}
